package lab02.test3;
public class Student {
   private double computerscore;
   private double mathscore;
   private double englishscore;
    double sum;
    double average;
    double max;
    double min;
    public Student(){

    }
    public Student(double computerscore,
                   double mathscore, double englishscore) {
        this.computerscore = computerscore;
        this.mathscore = mathscore;
        this.englishscore = englishscore;
    }

    public void setComputerscore(double computerscore) {
        this.computerscore = computerscore;
    }

    public void setMathscore(double mathscore) {
        this.mathscore = mathscore;
    }

    public void setEnglishscore(double englishscore) {
        this.englishscore = englishscore;
    }

    public double getComputerscore() {
        return computerscore;
    }

    public double getMathscore() {
        return mathscore;
    }

    public double getEnglishscore() {
        return englishscore;
    }
    void count(){
        sum= computerscore+mathscore+englishscore;
        average=sum/3;
        max=computerscore;
         min=computerscore;
        if(max<mathscore){
            max=mathscore;
        }
        if(max<englishscore){
            max=englishscore;
        }
        if (min>mathscore){
            min=mathscore;
        }
       if(min>englishscore){
            min=englishscore;
       }
        System.out.println("my sumscore is "+sum+" averagescore is "+average+
        " maxscore is "+max+" minscore is "+min);
    }
}
